import { post } from "./http";
const baseURL = "news/";
// 新增数据
export const getAddNews = (params) => {
  return post(`${baseURL}add`, params);
};

// 删除数据
export const getDeleteNews = (params) => {
  return post(`${baseURL}delete`, params);
};

// 根据ID修改数据
export const getNewsEdit = (params) => {
  return post(`${baseURL}update`, params);
};

// 分页 获取资讯信息
export const getNewsList = (params) => {
  return post(`${baseURL}get/page/list`, params);
};

// 根据ID查询
export const getByIdNews = (params) => {
  return post(`${baseURL}get/by/id`, params);
};

// 上传图片
export const uploadImageNews = (params) => {
  return post(`${baseURL}upload/image`, params);
};
